#!/bin/bash

ErrorNArgMessage="Not correct number of arguments. Require 1"
ErrorIncArgMessage="Incorrect NVIM confing directory path"
#ErrorNoNvimMessage="Nvim has not found"

if [ ! $#==1 ] 
then
  printf "$ErrorNArgMessage\n" >&2
  exit -1
fi

#if [ ! -f /bin/nvim ]
#then
#  printf "$ErrorNoNvimMessage\n" >&2
#  exit -2
#fi

if [ ! -d $1 ]
then
  printf "$ErrorIncArgMessage\n" >&2
  exit -3
fi

PATH=$1/init.vim
/bin/touch $PATH

./generateNvimConfig.sh > $PATH
